// Random move generator... of sorts. 
// randomally fills the game board. 
import java.util.Random;

class Noise{
	public static void main(String args[]){
		
		Random randomFoo = new Random();

		int board[][] = new int[9][9];
		int moves = 0;

		while(moves<81){
			
			int crdx = randomFoo.nextInt(9); //row
			int crdy = randomFoo.nextInt(9); //col

			if(board[crdx][crdy] == 0){
				board[crdx][crdy] = moves; //should be able to add error checking to this.
			} 
			else {
				moves--; //moves ignores this run
			}
			
			//System.out.println(crdx);
			//System.out.println(crdy);
			
			moves++;

		}
				
		show(board);
	}

	public static void show(int b[][]){
	
		//display the game board. mostly for testing. 
		//  x = row, y = col 
		for(int x=0;x < b.length;x++){
			for(int y=0; y<b[x].length; y++){
				System.out.print(b[x][y] + "  ");
			}
			System.out.println();
		}
	}

}
